$OpenBSD: patch-modules_gnome-settings-daemon-plugins_gsd-touchpad-manager_c,v 1.2 2013/04/01 07:27:19 ajacoutot Exp $

https://bugzilla.gnome.org/show_bug.cgi?id=631068

--- modules/gnome-settings-daemon-plugins/gsd-touchpad-manager.c.orig	Fri Feb  5 00:15:56 2010
+++ modules/gnome-settings-daemon-plugins/gsd-touchpad-manager.c	Mon Jan 17 14:42:04 2011
@@ -348,15 +348,15 @@ add_device_presence_filter (GsdPointingDeviceManager *
 
     gint op_code, event, error;
 
-    if (!XQueryExtension(GDK_DISPLAY(),
+    display = gdk_x11_get_default_xdisplay();
+
+    if (!XQueryExtension(display,
                          "XInputExtension",
                          &op_code,
                          &event,
                          &error)) {
         return;
     }
-
-    display = gdk_x11_get_default_xdisplay();
 
     gdk_error_trap_push();
     DevicePresence(display, xi_presence, class_presence);
